{% load static %}
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>登录页面</title>
    <link href="{% static 'blog/css/bootstrap.min.css'%}" rel="stylesheet">
</head>

<body>
<div class="container">
    <div class="row">
        <div align="center" style="margin-top:80px"><h2 class="form-signin-heading">请登录</h2></div>

        <form method="post" action="{% url 'blog:login' %}" class="form-horizontal col-md-6 col-md-offset-3 login-form" >
            {% csrf_token %}

            <div class="form-group">
                <label for="username" class="col-sm-2 control-label">用户名</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="username" name="username" placeholder="用户名">
                </div>
            </div>
            <div class="form-group">
                <label for="password" class="col-sm-2 control-label">密码</label>
                <div class="col-sm-10">
                    <input type="password" class="form-control" id="password" name="password" placeholder="密码">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
                    <span style="color:red">{{ error }}</span>
                </div>
            </div>
        </form>
    </div>
</div> <!-- /container -->
<script src="{% static 'blog/js/jquery-2.1.3.min.js' %}"></script>
<script src="{% static 'blog/js/bootstrap.min.js'%}"></script>
</body>
</html>
